import react from '@vitejs/plugin-react'
import { viteMockServe } from 'vite-plugin-mock';
import ViteSvgLoader from 'vite-plugin-svgr';

export function setupPlugins(isBuild: boolean, env: ViteEnv) {
    const plugins = [
        react(),
        viteMockServe({
            mockPath: 'mock',
            localEnabled: !isBuild,
        }),
        ViteSvgLoader()
    ]

    return plugins;
}